package dice.sinanya.dice.system;

import dice.sinanya.entity.EntityTypeMessages;

import static dice.sinanya.system.MessagesHelp.helpMap;
import static dice.sinanya.system.MessagesTag.TAG_MAN;
import static dice.sinanya.tools.makedata.MakeMessages.deleteTag;
import static dice.sinanya.tools.makedata.Sender.sender;

public class Man {


    private final EntityTypeMessages entityTypeMessages;

    public Man(EntityTypeMessages entityTypeMessages) {
        this.entityTypeMessages = entityTypeMessages;
    }

    public void man() {
        String tag = TAG_MAN;
        String msg = deleteTag(entityTypeMessages.getMsgGet().getMsg(), tag.substring(0, tag.length() - 2));
        sender(entityTypeMessages, helpMap.getOrDefault(msg, "未找到此命令"));
    }
}
